include $(ERP_BASE_PATH)/comm/makefile.comm.v2

INSTALL_PATH = "/share/$(USER)/daemon"

INCLUDE = -I../include \
		-I$(ERP_BASE_PATH)/comm/export_include/ \
		-I$(ERP_BASE_PATH)/comm/export_include/c2cplatform \
		-I$(ERP_BASE_PATH)/comm/export_include/app_platform \
		-I$(ERP_BASE_PATH)/comm/export_include/libc2c \
		-I$(ERP_BASE_PATH)/comm/export_include/c2cplatform/component \
        -I/share/comm_ext/ \
		-I../../app/giscoreao/XXO \
        -I../../export_include \
	  
LIB = -L$(ERP_BASE_PATH)/comm/$(LIB_PATH) \
		${CGI_APCGIBASE_LIB} \
		${LOG2_LIB} \
		${MSGQ_CONSUMER_LIB} \
		${ITIL_LIB} \
		${MODULE_LIB} \
		${XML_LIB} \
		${TCONV_LIB} \
		${ALGORITHM_LIB} \
		${CRYPTO_LIB} \
		-llibrary_the3_tinyxml \

OUTPUT = daemon_gis_useraddr

VPATH = ../lib
		
SOURCES = daemon_gis_useraddr.cpp

OBJECTS=$(SOURCES:.cpp=.o)

all:$(OUTPUT)

.SUFFIXES: .o .cpp
.cpp.o:
	$(CXX) $(CPPFLAGS) $(INCLUDE) -c $(filter %.cpp, $^) -o $@

.o:
	$(CXX) $(CPPFLAGS) $(INCLUDE) -o $@ $^ 

$(OUTPUT): $(OBJECTS)
	$(CXX) $(CFLAGS) -o $@ $^ ${LIB}

clean:
	rm -f $(OUTPUT) *.o

install:
	mkdir -p $(INSTALL_PATH)
	cp -vf $(OUTPUT).conf $(INSTALL_PATH)
	cp -vf $(OUTPUT) $(INSTALL_PATH)

installrpm:
	sudo cp -vf $(OUTPUT) /data/rpm_data_64bit/icson/icson_daemon_gis_useraddr_1/build_directory/data/icson/daemon/daemon_gis_useraddr/

dep:
	mkdep -p$(VPATH) $(INCLUDE) $(SOURCES) > .depend

ifneq ($(wildcard .depend),)
include .depend
endif
